<template>
  <van-nav-bar
    title="登录"
    left-arrow
    @click-left="onClickLeft"
    :border="false"
  />
  <div class="RegItem">
    <van-cell-group inset>
      <!-- 输入手机号，调起手机号键盘 -->
      <van-field v-model="tel" type="tel" label="手机号" placeholder="手机号" />
      <!-- 输入密码 -->
      <van-field v-model="password" type="password" label="密码" />
    </van-cell-group>
    <div class="kong"></div>
    <van-button @click="denglu" type="primary" color="red" size="large" round
      >登录</van-button>
      <p class="fontP">忘记密码？<br>
        <span @click="register" style ="color: red;">注册</span>
        </p>
  </div>
</template>
<script setup lang="ts">
import { ref } from "vue";
import {useRouter} from 'vue-router'
  const router = useRouter()
const onClickLeft = () => history.back();
const tel = ref("");
const password = ref("");
function register() {
  router.push(
      {
         name:'register', 
      }
    )
}
function denglu() {
  router.push(
      {
         name:'my', 
      }
    )
}
</script>
<style scoped>
.RegItem {
  width: 80%;
  margin: 0 auto;
}
.kong {
  height: 30px;
}
.fontP{
    color: gray;
    font-size: 10px;
    margin-top: 10px;
}
</style>



<style >
.van-icon-arrow-left:before {
  color: gray;
}
</style>